package de.hska.algo.labor2010.strecken;

import java.util.ArrayList;

import junit.framework.Assert;

import org.junit.Test;

public class RandomLinesTest {

	@Test
	public void testRandomLines() {
		RandomLines rand = new RandomLines(4);
		Assert.assertEquals(4,rand.getLines().size());
		
	}
	@Test
	public void testsetLines(){
		RandomLines rand = new RandomLines(4);
		ArrayList<Line> lines= new ArrayList<Line>();
		lines.add(new Line(1.0,1.0,0.0,0.0));
		rand.setLines(lines);
		Assert.assertEquals(1,rand.getLines().size());
	}
	@Test
	public void testshow(){
		RandomLines rand = new RandomLines(4);
		ArrayList<Line> lines= new ArrayList<Line>();
		lines.add(new Line(1.0,1.0,0.0,0.0));
		rand.setLines(lines);
		Assert.assertEquals(1,rand.getLines().size());
		String sth = "Lines\n0: (0.0 , 0.0) (1.0 , 1.0)\n";
		Assert.assertEquals(sth,rand.toString());
	}
	
}
